package com.mercator.client.graph;

import java.util.Comparator;
import java.util.LinkedList;

public class PMapComparator implements Comparator<LinkedList<GenClique>> {

	@Override
	public int compare(LinkedList<GenClique> arg0, LinkedList<GenClique> arg1) {
		int first = (arg0.getFirst() == null)? 0 :arg0.getFirst().genesets.size();
		int second = (arg1.getFirst() == null)? 0 :arg1.getFirst().genesets.size();
		if(first > second)
			return 1;
		else if (first < second)
			return -1;
		return 0;
	}

	
	
	
}
